There are two primary steps in setting up export rules: create an export rule set, then add export rules to the rule set. To create a rule set, use the protocol exportruleset new command, and specify a virtual server and a name for the rule set. After you create the rule set, add rules to it by using the protocol exportruleset rule new command.
The following example creates an export rule set named rs1 on a virtual server named vs0:
node::>protocol exportruleset new -vserver vs0 -rulesetname rs1
By default, the protocol exportruleset show command displays the virtual server name and export rule set name for all export rule sets, as in the following example.
node::>protocol exportruleset showVirtual Server Ruleset Name vs0 rs0 vs0 rs1 vs0 rs2 vs0 rs3 vs1 rs3 vs1 rs4 vs1 rs5
The protocol exportruleset copy command creates a copy of an export rule set on the same or a different virtual server. The command fails if an export rule set with the specified new name already exists on the target virtual server. You can use this command to set up parallel export rule sets on multiple virtual servers, or to make a copy of an export rule set on the same virtual server for later modification.
The following example creates a copy of an export rule set named rs1 on a virtual server named vs0. The copy is also named rs1 and is made on a virtual server named vs1.
node::>protocol exportruleset copy -vserver vs0 -rulesetname rs1 -newvserver vs1 -newrulesetname rs1
You can use the protocol exportruleset rename command to rename an export rule set. The renaming operation takes place within the context of the same virtual server. The command fails if an export rule set with the specified new name already exists on the virtual server.
The following example renames an export rule set named rs1 with the name rs0 on a virtual server named vs1.
node::>protocol exportruleset rename -vserver vs1 -rulesetname rs1 -newrulesetname rs0
To delete an export rule set and all of the rules that it contains, use the protocol exportruleset delete command. You cannot delete a virtual server's default rule set, which by default is named default_ruleset, unless you delete the virtual server.
The following example deletes an export rule set named rs3 from a virtual server named vs0.
node::>protocol exportruleset delete -vserver vs0 -rulesetname rs3